//
//  UIView+CycleLayer.h
//  CycleControlFunction
//
//  Created by ddy on 2018/8/7.
//  Copyright © 2018年 ddy. All rights reserved.
//  设置图层layer

#import <UIKit/UIKit.h>

@interface UIView (CycleLayer)
/**
 * 设置圆角
 */
- (void)cycle_setLayerCornerRadius:(CGFloat)radius;
/**
 *  给view切圆角
 *  corners : 哪个角
 *  cornerRadii : 圆角size
 */
- (instancetype)cycle_cornerByRoundingCorners:(UIRectCorner)corners cornerRadius:(CGFloat)cornerRadius;

/**
 * 设置圆角边框
 */
- (void)cycle_setLayerCornerRadius:(CGFloat)radius andBorderWidth:(CGFloat)width andBorderColor:(UIColor *)borderColor;
/**
 *  给view切圆角 指定上下左右方向圆角 ，设置边框颜色 纯代码
 *  corners : 哪个角
 *  cornerRadii : 圆角size
*/
- (void)cycle_setupView:(UIView *)view corners:(UIRectCorner)corner cornerRadius:(CGFloat)cornerRadius borderWidth:(CGFloat)width borderColor:(UIColor *)borderColor;
/**
 * 设置阴影
 *
 * @param color 阴影的颜色
 * @param size  阴影的偏移量
 * @param opacity 阴影的透明度
 */
- (void)cycle_setShadowColor:(UIColor *)color andShadowOffset:(CGSize)size andShadowOpacity:(CGFloat)opacity;
/**
 * 画六边形 并点击
 * @param imageView 图片View
 * @param image image
 * @param cornerColor 图片距离layer边缘颜色
 * @param left 图片距离layer边缘距离
 * @param block 点击图片的回调
 */
- (void)cycle_setSixCornerLayerWithView:(UIImageView *)imageView image:(UIImage *)image cornerColor:(UIColor *)cornerColor cornerMargin:(float)left tapImageViewBlock:(void(^)(UIImageView *imgView))block;
/**
 * 画五边形 并点击
 */
- (void)cycle_setFiveCornerLayerWithView:(UIImageView *)imageView image:(UIImage *)image cornerColor:(UIColor *)cornerColor cornerMargin:(float)left tapImageViewBlock:(void(^)(UIImageView *imgView))block;


@end

